int i =0;

void setup() {
  // put your setup code here, to run once:
  pinMode(3,OUTPUT);    //IO初始化

}


void loop() {
  // put your main code here, to run repeatedly:


 for(i=0;i<=255;i++)   //呼吸灯，亮
 {
  analogWrite(3,i);
  Serial.print("i = ");
  Serial.println(i);
  delay(10);

 }
 for(i=255;i>=1;i--)   //呼吸灯，暗
 {
  analogWrite(3,i);
  Serial.print("i = ");
  Serial.println(i);
  delay(10);

 }
}
